package com.base.cn.platform.os.service.op.advert;


import com.base.cn.platform.os.common.mybatis.BaseBiz;
import com.base.cn.platform.os.common.utils.DataUtil;
import com.base.cn.platform.os.dao.op.advert.OpAdvertPlaceDao;
import com.base.cn.platform.os.entity.op.advert.OpAdvertPlace;
import org.springframework.stereotype.Service;


/**
 * 广告位置Biz
 *
 * @author s.li
 * @create 2017-07-31-18:48
 */
@Service
public class OpAdvertPlaceBiz extends BaseBiz<OpAdvertPlace,OpAdvertPlaceDao> {
    /**
     * 保存广告位置信息数据
     * @param advertPlace 广告位置信息对象
     * @return Map<String,Object>
     */
    public OpAdvertPlace saveUpdateAdvertPlace(OpAdvertPlace advertPlace){
        if(DataUtil.idIsNotNull(advertPlace.getId())){
            this.updateById(advertPlace,null);
        }else{
            this.save(advertPlace);
        }
        return advertPlace;
    }
}
